// Copyright 叶湘 ( weixin:yexiang841, email:yexiang841@qq.com ), Shitouren Studio. All Rights Reserved.

#pragma once

#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "Q3D_CPPU_PawnState.generated.h"

DECLARE_DYNAMIC_MULTICAST_DELEGATE(FQ3D_D_Pawn_Unregisted);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FQ3D_D_Pawn_Possess_Reset, bool, bool_possessed);

/**
 * 
 */
UCLASS(Blueprintable, ClassGroup = (Q3D), meta = (Tooltip = "用于 Q3D_Pawn 的 PawnState 数据类(C++)"))
class Q3D_LIB_API UQ3D_CPPU_PawnState : public UObject
{
	GENERATED_BODY()

public:
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Q3D_PawnState, meta = (Tooltip = "为 Pawn/PawnState 指定一个 FName 类型的 ID", ExposeOnSpawn = "true"))
	FName Name_Id;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Q3D_PawnState, meta = (Tooltip = "为 Pawn/PawnState 指定一个 FString 类型的原始名字", ExposeOnSpawn = "true"))
	FString String_NickName;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Q3D_PawnState, meta = (Tooltip = "Pawn 引用", ExposeOnSpawn = "true"))
	APawn *Ptr_A_Pawn;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Q3D_PawnState, meta = (Tooltip = "所属的 PlayerState 引用（根据 int_player_index）"))
	APlayerState *Ptr_A_PlayerState;

public:
	UFUNCTION(BlueprintPure, Category = Q3D_PawnState, meta = (Tooltip = "读取 Player 序号"))
	void Q3D_F_PlayerIndex_Get(UPARAM(DisplayName = "int_player_index") int32 &int_player_index) const;

	UFUNCTION(BlueprintPure, Category = Q3D_PawnState, meta = (Tooltip = "读取 FString 类型名字转换为 FText 类型用于显示"))
	void Q3D_F_TextDisplayname_GetFull(UPARAM(DisplayName = "text_display_name") FText &text_display_name) const;

	UFUNCTION(BlueprintPure, Category = Q3D_PawnState, meta = (Tooltip = "根据长度限制前向截取 FString 类型名字转换为 FText 类型用于显示,多出部分用 ... 代替"))
	void Q3D_F_TextDisplayname_GetForward(int int_len_limit, UPARAM(DisplayName = "text_display_name") FText &text_display_name) const;

	UFUNCTION(BlueprintPure, Category = Q3D_PawnState, meta = (Tooltip = "根据长度限制反向截取 FString 类型名字转换为 FText 类型用于显示,多出部分用 ... 代替"))
	void Q3D_F_TextDisplayname_GetBackward(int int_len_limit, UPARAM(DisplayName = "text_display_name") FText &text_display_name) const;

	UFUNCTION(BlueprintPure, Category = Q3D_PawnState, meta = (Tooltip = "根据长度限制前后截取 FString 类型名字转换为 FText 类型用于显示,多出部分用 ... 代替"))
	void Q3D_F_TextDisplayname_GetTwoway(int int_len_limit, UPARAM(DisplayName = "text_display_name") FText &text_display_name) const;

public:
	UPROPERTY(BlueprintAssignable, Category = Q3D_PawnState, meta = (Tooltip = "多播代理：注销 Pawn"))
	FQ3D_D_Pawn_Unregisted Q3D_ED_Pawn_Unregisted;

	UPROPERTY(BlueprintAssignable, Category = Q3D_PawnState, meta = (Tooltip = "多播代理：Possess 状态重置"))
	FQ3D_D_Pawn_Possess_Reset Q3D_ED_Pawn_Possess_Reset;
};
